Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's new: queries #4058

Merged
merged 2 commits into from
Sep 27, 2022
Merged

What's new: queries #4058

merged 2 commits into from
Sep 27, 2022

Conversation

ajcvickers
Copy link
Member

No description provided.

Which translates to different SQL:

```sql
SELECT [p].[Id], [p].[AuthorId], [p].[BlogId], [p].[Content], [p].[Discriminator], [p].[PublishedOn], [p].[Title], [p].[PromoText]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I wonder if it makes sense for us to filter on the discriminator with an IN ('Post', 'FeaturedPost') post, rather than fetching everything and filtering on the client...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We normally filter by the discriminator, but this is a query for the base type (there are only two types in the model) so it's like the OfType isn't there. Perhaps not the best example to show.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh I see, makes sense. Yeah, using an intermediate hierarchy type may make this clearer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we don't filter anything on client.

@ajcvickers ajcvickers merged commit 7b62d0c into main Sep 27, 2022
@ajcvickers ajcvickers deleted the CurioQuerio0925 branch September 27, 2022 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants